<%-- 
    Document   : smallBook
    Created on : Feb 23, 2013, 5:49:14 PM
    Author     : DELL
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="index" value="0"/>
<c:forEach items="${displayedbooks}" var="book" >
    <div class="templatemo_product_box">
        <h1>${book.title} <span>(${book.auther})</span></h1>
        <img src="${book.cover}" alt="image" />
        <div class="product_info">
            <%--<p>${book.desc} </p> --%>

            <h3>$ ${book.price}</h3>
            <h2> ${book.category} <small>(${book.numPages} pages)</small></h2>
            <div class="buy_now_button"><a href="caret.jsp?isbn=${book.isbn}"> Add to Cart</a></div>
            <div class="detail_button"><a href=book.jsp?isbn=${book.isbn}>Detail</a></div>
        </div>
        <div class="cleaner">&nbsp;</div>
    </div>
    <c:set var="index" value="${index+1}"/>
    <c:choose>
        <c:when test="${index%2==0}">
            <div class="cleaner_with_heigh">&nbsp;</div>
        </c:when>
        <c:otherwise>
            <div class="cleaner_with_width">&nbsp;</div>
        </c:otherwise>
    </c:choose>

</c:forEach>